You are here: Scripting Reference > Data Types > Integer (Integer, Cardinal, Int64)

Integer (Integer, Cardinal, Int64)

Declaration

var myvariable : integer;

var mylargepositivevariable : cardinal;

var mylargevariable : Int64;

Example

procedure ScriptEvent (var Value : variant)

var myvariable : integer

begin

myvariable := 123;

loginfo('the value of myvariable is '+IntToStr(myvariable));

end

Description

Integer is used to represent whole numbers. A whole number is one without decimal places.

An Integer can store a number between -2147483648 and 2147483647

Cardinal is an unsigned integer. It also a whole number but allows you to store a much higher number because it does not need to store a sign (positive/negative number). Because it is unsigned it is not possible to store a negative number in a cardinal. A Cardinal can store a number between 0 and 4294967295.

Int64 uses more memory to allow you to store a larger number. It can store both positive and negative numbers. A Int64 can store a number between -2^63 and 2^63-1.

If you try to store a number in a data type that is unable to fit that number you will receive an Overflow error.

If a field within a DB/File Definition is specified as Integer you do not need to provide a display format.